home *** CD-ROM | disk | FTP | other *** search
- " ------------------------------------------------------------------- "
- " Printer Class is a class for controlling the printer device. "
- ""
- " If any 'Send' method seems to hang the System, either Ctrl-C or "
- " Ctrl-D should break the I/O hangup. "
- ""
- " WARNING: You should know what you're doing to the Amiga OS before "
- " messing with this Class, or any other System Class! "
- ""
- " If your printer does not support a method, AmigaTalk might display "
- " a Requester stating that the printer.device failed to open, because "
- " the Error code returned by the printer.device is brain-damaged. "
- " ------------------------------------------------------------------- "
-
- Class PrinterDevice :Device ! private !
- [
- initialize: initString
- " Send an initialization string to the printer.device. "
- <primitive 225 2 private initString>
- |
- getPrinterClassString
- ^ <primitive 225 19>
- |
- getPrinterColorClassString
- ^ <primitive 225 20>
- |
- getPrinterName
- ^ <primitive 225 21>
- |
- getNumberOfCharSets
- ^ <primitive 225 22>
- |
- getHorizontalDPI
- ^ <primitive 225 23>
- |
- getVerticalDPI
- ^ <primitive 225 24>
- |
- getNumberOfPrintColumns
- ^ <primitive 225 25>
- |
- getNumberOfHeadPins
- ^ <primitive 225 26>
- |
- getMaxXRasterDump
- ^ <primitive 225 27>
- |
- getMaxYRasterDump
- ^ <primitive 225 28>
- |
- reset
- " Send CMD_RESET to printer.device. "
- <primitive 225 9 private>
- |
- sendExtendedCmd: command parm1: p1 parm2: p2 parm3: p3 parm4: p4
- " Send an extended command to the printer.device.
- * See PrtCommands class below.
- "
- <primitive 225 6 private command p1 p2 p3 p4>
- |
- restart
- " Send CMD_START to the printer.device. "
- <primitive 225 10 private>
- |
- stop
- " Send CMD_STOP to the printer.device. "
- <primitive 225 11 private>
- |
- flush
- " Send CMD_FLUSH to the printer.device. "
- <primitive 225 8 private>
- |
- query
- " Ask the printer.device to return two bytes of status (PRD_QUERY)
- * as a two-byte String. The String might have non-displayable values!
- "
- ^ <primitive 225 5 private>
- |
- dumpGraphics: specialArray ! rpObj cm modeID xOffset yOffset w h dc dr flags !
- " Send PRD_DUMPRPORT to the printer.device in order to print a screen
- * dump.
- *
- * The parameters needed in specialArray are as follows:
- *
- * rpObj = raster port, struct RastPort *
- * cm = color map, struct ColorMap *
- * modeID = screenModeID, ULONG
- * xOffset = source x origin, UWORD
- * yOffset = source y origin, UWORD
- * w = source width, UWORD
- * h = source height, UWORD
- * dc = destination width, LONG
- * dr = destination height, LONG
- * flags = option flags, UWORD
- "
- rpObj <- specialArray at: 1.
- cm <- specialArray at: 2.
- modeID <- specialArray at: 3.
- xOffset <- specialArray at: 4.
- yOffset <- specialArray at: 5.
- w <- specialArray at: 6.
- h <- specialArray at: 7.
- dc <- specialArray at: 8.
- dr <- specialArray at: 9.
- flags <- specialArray at: 10. "See PrtRPFlags class below."
-
- <primitive 225 12 private rpObj cm modeID xOffset yOffset w h dc dr flags>
- |
- readPrinterPrefsInto: aBuffer ofSize: length
- " If the read fails because the buffer is too small you should double
- * the size of the buffer and try it again.
- *
- * Never interpret the contents of the buffer. You are allowed to save
- * it to file (as one block of data) and of course to write it back to
- * the driver (writePrinterPrefs).
- *
- * If you close the printer device between PRD_EDITPREFS and the
- * actual printing (CMD_WRITE or PRD_DUMPRPORTTAGS) you must read
- * the prefs after PRD_EDITPREFS and write it back before printing
- * or the driver may forget the user changes.
- "
- ^ <primitive 225 14 private aBuffer length>
- |
- writePrinterPrefsFrom: aBuffer ofSize: length
- " This is a non standard write command that writes the driver
- * preferences. The printer driver checks the buffer before
- * copying it to its preferences. So you do not have to worry
- * about changing the printer driver between readPrinterPrefsInto:ofSize:
- * and this method.
- "
- ^ <primitive 225 15 private aBuffer length>
- |
- editPrinterPrefs: tagArray
- " New drivers can have their own preferences. This method asks the driver
- * to open a window to allow the user to change the prefs.
- *
- * Every application should have a button 'Driver Options...' (that
- * calls this method in its printer dialog.
- "
- ^ <primitive 225 16 private tagArray>
- |
- setPrinterErrorHook: hookObject
- " This command sets a hook that will be called if the printer.device
- * returns with an error from any other I/O command. This allows
- * printer drivers to use private error messages.
- "
- ^ <primitive 225 17 private hookObject>
- |
- dumpTaggedGraphics: specialArray ! rpObj cm modeID xOffset yOffset w h dc dr flags tags !
- " Send PRD_DUMPRPORTTAGS to the printer.device in order to print a screen
- * dump.
- *
- * The parameters needed in specialArray are as follows:
- *
- * rpObj = raster port, struct RastPort *
- * cm = color map, struct ColorMap *
- * modeID = screenModeID, ULONG
- * xOffset = source x origin, UWORD
- * yOffset = source y origin, UWORD
- * w = source width, UWORD
- * h = source height, UWORD
- * dc = destination width, LONG
- * dr = destination height, LONG
- * flags = option flags, UWORD
- * tags = tagList struct TagItem *
- "
- rpObj <- specialArray at: 1.
- cm <- specialArray at: 2.
- modeID <- specialArray at: 3.
- xOffset <- specialArray at: 4.
- yOffset <- specialArray at: 5.
- w <- specialArray at: 6.
- h <- specialArray at: 7.
- dc <- specialArray at: 8.
- dr <- specialArray at: 9.
- flags <- specialArray at: 10. "See PrtRPFlags class below."
- tags <- specialArray at: 11.
-
- <primitive 225 13 private rpObj cm modeID xOffset yOffset w h dc dr flags tags>
- |
- getPrinterErrorString
- " Return a String that describes the last Printer Error Number found. "
- ^ <primitive 225 18 private>
- |
- close
- " Close the printer.device & remove it from AmigaTalk program space. "
- <primitive 225 0 private>
- |
- open: printerName
- " Allocate the internal memory & structures needed for opening
- * the printer.device. Return an Integer Object.
- "
- private <- <primitive 225 1 printerName>
- |
- sendRawWrite: buffer ofLength: length
- " Send a Raw buffer of data to the printer.device. "
- <primitive 225 7 private buffer length>
- |
- write: thisString ofLength: length
- " Write a string length bytes long to the printer.device. "
- ^ <primitive 225 3 private thisString length>
- |
- asyncWrite: thisString ofLength: length
- " Write a string length bytes long to the printer.device
- * with asynchronous I/O.
- "
- ^ <primitive 225 4 private thisString length>
- |
- " SHORTCUTS FOR COMMON PRINTER COMMANDS: "
-
- crlf ! prtCmds crlfCode !
- prtCmds <- PrtCommands new.
- crlfCode <- prtCmds at: #aNEL.
-
- " Send a Carriage Return-LineFeed command code to the Printer:"
- <primitive 225 6 private crlfCode 0 0 0 0>
- |
- nlqOn ! prtCmds nlqOnCode !
- prtCmds <- PrtCommands new.
- nlqOnCode <- prtCmds at: #aDEN2.
-
- " Send a Near Letter Quality ON command code to the Printer:"
- <primitive 225 6 private nlqOnCode 0 0 0 0>
- |
- nlqOff ! prtCmds nlqOffCode !
- prtCmds <- PrtCommands new.
- nlqOffCode <- prtCmds at: #aDEN1.
-
- " Send a Near Letter Quality OFF command code to the Printer:"
- <primitive 225 6 private nlqOffCode 0 0 0 0>
- |
- normalCharSet ! prtCmds normCode !
- prtCmds <- PrtCommands new.
- normCode <- prtCmds at: #aSGR0.
-
- " Send a Normal Character Set command code to the Printer:"
- <primitive 225 6 private normCode 0 0 0 0>
- |
- italicsOn ! prtCmds italicOnCode !
- prtCmds <- PrtCommands new.
- italicOnCode <- prtCmds at: #aSGR3.
-
- " Send an Italics ON command code to the Printer:"
- <primitive 225 6 private italicOnCode 0 0 0 0>
- |
- italicsOff ! prtCmds italicOffCode !
- prtCmds <- PrtCommands new.
- italicOffCode <- prtCmds at: #aSGR23.
-
- " Send an Italics OFF command code to the Printer:"
- <primitive 225 6 private italicOffCode 0 0 0 0>
- |
- underlineOn ! prtCmds underOnCode !
- prtCmds <- PrtCommands new.
- underOnCode <- prtCmds at: #aSGR4.
-
- " Send an Underline ON command code to the Printer:"
- <primitive 225 6 private underOnCode 0 0 0 0>
- |
- underlineOff ! prtCmds underOffCode !
- prtCmds <- PrtCommands new.
- underOffCode <- prtCmds at: #aSGR24.
-
- " Send an Underline OFF command code to the Printer:"
- <primitive 225 6 private underOffCode 0 0 0 0>
- |
- boldOn ! prtCmds boldOnCode !
- prtCmds <- PrtCommands new.
- boldOnCode <- prtCmds at: #aSGR1.
-
- " Send an BoldFace ON command code to the Printer:"
- <primitive 225 6 private boldOnCode 0 0 0 0>
- |
- boldOff ! prtCmds boldOffCode !
- prtCmds <- PrtCommands new.
- boldOffCode <- prtCmds at: #aSGR22.
-
- " Send an BoldFace OFF command code to the Printer:"
- <primitive 225 6 private boldOffCode 0 0 0 0>
- |
- normalPitch ! prtCmds normalCode !
- prtCmds <- PrtCommands new.
- normalCode <- prtCmds at: #aSHORP0.
-
- " Send an Normal Pitch command code to the Printer:"
- <primitive 225 6 private normalCode 0 0 0 0>
- |
- elitePitchOn ! prtCmds eliteOnCode !
- prtCmds <- PrtCommands new.
- eliteOnCode <- prtCmds at: #aSHORP2.
-
- " Send an Elite Pitch ON command code to the Printer:"
- <primitive 225 6 private eliteOnCode 0 0 0 0>
- |
- elitePitchOff ! prtCmds eliteOffCode !
- prtCmds <- PrtCommands new.
- eliteOffCode <- prtCmds at: #aSHORP1.
-
- " Send an Elite Pitch OFF command code to the Printer:"
- <primitive 225 6 private eliteOffCode 0 0 0 0>
- |
- condensedPitchOn ! prtCmds condensedOnCode !
- prtCmds <- PrtCommands new.
- condensedOnCode <- prtCmds at: #aSHORP4.
-
- " Send a Condensed Fine Pitch ON command code to the Printer:"
- <primitive 225 6 private condensedOnCode 0 0 0 0>
- |
- condensedPitchOff ! prtCmds condensedOffCode !
- prtCmds <- PrtCommands new.
- condensedOffCode <- prtCmds at: #aSHORP3.
-
- " Send a Condensed Fine Pitch OFF command code to the Printer:"
- <primitive 225 6 private condensedOffCode 0 0 0 0>
- |
- enlargedPitchOn ! prtCmds enlargedOnCode !
- prtCmds <- PrtCommands new.
- enlargedOnCode <- prtCmds at: #aSHORP6.
-
- " Send a Enlarged Pitch ON command code to the Printer:"
- <primitive 225 6 private enlargedOnCode 0 0 0 0>
- |
- enlargedPitchOff ! prtCmds enlargedOffCode !
- prtCmds <- PrtCommands new.
- enlargedOffCode <- prtCmds at: #aSHORP5.
-
- " Send a Enlarged Pitch OFF command code to the Printer:"
- <primitive 225 6 private enlargedOffCode 0 0 0 0>
- |
- superScriptOn ! prtCmds superOnCode !
- prtCmds <- PrtCommands new.
- superOnCode <- prtCmds at: #aSUS2.
-
- " Send a SuperScript ON command code to the Printer:"
- <primitive 225 6 private superOnCode 0 0 0 0>
- |
- superScriptOff ! prtCmds superOffCode !
- prtCmds <- PrtCommands new.
- superOffCode <- prtCmds at: #aSUS1.
-
- " Send a SuperScript OFF command code to the Printer:"
- <primitive 225 6 private superOffCode 0 0 0 0>
- |
- subScriptOn ! prtCmds subOnCode !
- prtCmds <- PrtCommands new.
- subOnCode <- prtCmds at: #aSUS4.
-
- " Send a SubScript ON command code to the Printer:"
- <primitive 225 6 private subOnCode 0 0 0 0>
- |
- subScriptOff ! prtCmds subOffCode !
- prtCmds <- PrtCommands new.
- subOffCode <- prtCmds at: #aSUS3.
-
- " Send a SubScript OFF command code to the Printer:"
- <primitive 225 6 private subOffCode 0 0 0 0>
- |
- normalizeLine ! prtCmds normCode !
- prtCmds <- PrtCommands new.
- normCode <- prtCmds at: #aSUS0.
-
- " Send a Normalize the line (after super or sub-scripting)
- * command code to the Printer:
- "
- <primitive 225 6 private normCode 0 0 0 0>
- |
- partialLineUp ! prtCmds partUpCode !
- prtCmds <- PrtCommands new.
- partUpCode <- prtCmds at: #aPLU.
-
- " Send a Partial line UP command code to the Printer:"
- <primitive 225 6 private partUpCode 0 0 0 0>
- |
- partialLineDown ! prtCmds partDnCode !
- prtCmds <- PrtCommands new.
- partDnCode <- prtCmds at: #aPLD.
-
- " Send a Partial line DOWN command code to the Printer:"
- <primitive 225 6 private partDnCode 0 0 0 0>
- |
- setFormLength: numLines ! prtCmds formCode !
- prtCmds <- PrtCommands new.
- formCode <- prtCmds at: #aSLPP.
-
- " Send a Set Form Length nn command code to the Printer:"
- <primitive 225 6 private formCode numLines 0 0 0>
- |
- setPerfSkip: numLines ! prtCmds perfCode !
- (numLines <= 0)
- ifTrue: [ ^ nil ]. " User is brain-damaged! "
-
- prtCmds <- PrtCommands new.
- perfCode <- prtCmds at: #aPERF.
-
- " Send a Set Perforation Skip nn command code to the Printer:"
- <primitive 225 6 private perfCode numLines 0 0 0>
- |
- perfSkipOff ! prtCmds perfOffCode !
- prtCmds <- PrtCommands new.
- perfOffCode <- prtCmds at: #aPERF0.
-
- " Send a Perforation Skip OFF command code to the Printer:"
- <primitive 225 6 private perfOffCode 0 0 0 0>
- |
- setLeftMargin: numSpaces ! prtCmds leftCode !
- prtCmds <- PrtCommands new.
- leftCode <- prtCmds at: #aLMS.
-
- " Send a Left Margin Set nn command code to the Printer:"
- <primitive 225 6 private leftCode numSpaces 0 0 0>
- |
- setRightMargin: numSpaces ! prtCmds rightCode !
- prtCmds <- PrtCommands new.
- rightCode <- prtCmds at: #aRMS.
-
- " Send a Right Margin Set nn command code to the Printer:"
- <primitive 225 6 private rightCode numSpaces 0 0 0>
- |
- setTopMargin: numLines ! prtCmds topCode !
- prtCmds <- PrtCommands new.
- topCode <- prtCmds at: #aTMS.
-
- " Send a Top Margin Set nn command code to the Printer:"
- <primitive 225 6 private topCode numLines 0 0 0>
- |
- setBottomMargin: numLines ! prtCmds bottomCode !
- prtCmds <- PrtCommands new.
- bottomCode <- prtCmds at: #aBMS.
-
- " Send a Bottom Margin Set nn command code to the Printer:"
- <primitive 225 6 private bottomCode numLines 0 0 0>
- |
- setTopAndBottomMargins: topLines bottom: bottomLines ! prtCmds topCode !
- prtCmds <- PrtCommands new.
- topCode <- prtCmds at: #aSTBM.
-
- " Send a Top & Bottom Margin Set nn command code to the Printer:"
- <primitive 225 6 private topCode topLines bottomLines 0 0>
- |
- setLeftAndRightMargins: leftSpcs right: rightSpcs ! prtCmds leftCode !
- prtCmds <- PrtCommands new.
- leftCode <- prtCmds at: #aSLRM.
-
- " Send a Left & Right Margin Set nn command code to the Printer:"
- <primitive 225 6 private leftCode leftSpcs rightSpcs 0 0>
- |
- clearMargins ! prtCmds clearCode !
- prtCmds <- PrtCommands new.
- clearCode <- prtCmds at: #aCAM.
-
- " Send a Clear Margins command code to the Printer:"
- <primitive 225 6 private clearCode 0 0 0 0>
- |
- setTabs: tab1 t2: tab2 t3: tab3 t4: tab4 ! prtCmds hTabCode !
- prtCmds <- PrtCommands new.
- hTabCode <- prtCmds at: #aHTS.
-
- " Send a Set Horizontal Tabs command code to the Printer:"
- <primitive 225 6 private hTabCode tab1 tab2 tab3 tab4>
- |
- setTab: tab ! prtCmds hTabCode !
- prtCmds <- PrtCommands new.
- hTabCode <- prtCmds at: #aHTS.
-
- " Send a Set Horizontal Tab nn command code to the Printer:"
- <primitive 225 6 private hTabCode tab 0 0 0>
- |
- clearTabs ! prtCmds clearCode !
- prtCmds <- PrtCommands new.
- clearCode <- prtCmds at: #aTBC3.
-
- " Send a Clear ALL Horizontal Tabs command code to the Printer:"
- <primitive 225 6 private clearCode 0 0 0 0>
- |
- sendFormFeed ! formfeed !
- formfeed <- <primitive 96 12>.
-
- " Send an ASCII FormFeed character (value = 12) to the Printer: "
- self asyncWrite: formfeed ofLength: 1
- ]
-
- " ------------------------------------------------------------------- "
- " PrtRPFlags Class is a Singleton class that allows the user to "
- " reference special printer flags' hexadecimal values symbolically. "
- ""
- " ALL singleton classes MUST contain the following: "
- ""
- " the methods: isSingleton AND privateSetup AND "
- " uniqueInstance Class instance variable. "
- " ------------------------------------------------------------------- "
-
- Class PrtRPFlags :Dictionary ! uniqueInstance !
- [
- isSingleton
- ^ true
- |
- privateNew ! newinstance !
- newinstance <- super new.
-
- ^ newinstance
- |
- new
- ^ self privateSetup
- |
- privateInitializeDictionary
- "Dump RastPort to Printer flags::"
-
- self at: #SPECIAL_ASPECT put: 16r80.
- self at: #SPECIAL_CENTER put: 16r40.
- self at: #SPECIAL_NOFORMFEED put: 16r800.
- self at: #SPECIAL_NOPRINT put: 16r2000.
- self at: #SPECIAL_TRUSTME put: 16r1000.
- self at: #SPECIAL_DENSITY1 put: 16r100.
- self at: #SPECIAL_DENSITY2 put: 16r200.
- self at: #SPECIAL_DENSITY3 put: 16r300.
- self at: #SPECIAL_DENSITY4 put: 16r400.
- self at: #SPECIAL_DENSITY5 put: 16r500.
- self at: #SPECIAL_DENSITY6 put: 16r600.
- self at: #SPECIAL_DENSITY7 put: 16r700.
- self at: #SPECIAL_FULLCOLS put: 4.
- self at: #SPECIAL_FULLROWS put: 8.
- self at: #SPECIAL_FRACCOLS put: 16r10.
- self at: #SPECIAL_FRACROWS put: 16r20.
- self at: #SPECIAL_MILCOLS put: 1.
- self at: #SPECIAL_MILROWS put: 2.
-
- " setErrorHook Symbols: "
-
- self at: #PDHOOK_NONE put: 0.
- self at: #PDHOOK_STD put: 1.
-
- " dumpTaggedGraphics: tag Symbols: "
-
- " a pointer to struct Hook which is called to read
- * the source data. io_RastPort and io_ColorMap are
- * ignored and should be NULL.
- *
- * The hook is called with object == NULL and message
- * is a pointer to struct DRPSourceMsg. It must read
- * an array of source data.
- *
- * Each pixel of the array is an ULONG of form 16r00RRGGBB.
- *
- * Some printer drivers have set PPCB_NOSTRIPE which
- * means they cannot print in stripes. Using
- * DRPA_SourceHook is the best way for printing for such
- * printers because you can still prepare the printer
- * source data in stripes then.
- *
- * The Source Hook is always called in the context of
- * the printer driver DOS process.
- "
- self at: #DRPA_SourceHook put: 16r80060004. "Ignores RastPort & ColorMap"
-
- self at: #DRPA_AspectX put: 16r80060005. "the X aspect ratio."
-
- " the Y aspect ratio. This values overwrites the aspect
- * ratio from GfxBase or io_Modes and is used for scaling.
- "
- self at: #DRPA_AspectY put: 16r80060006.
-
- self at: #DRPA_ICCProfile put: 16r80060001. " Reserved "
- self at: #DRPA_ICCName put: 16r80060002. " Reserved "
- self at: #DRPA_NoColCorrect put: 16r80060003. " Reserved "
-
- " editPrinterPrefs: tag Symbols: "
-
- " A pointer to a window. This prefs window will open on the
- * same screen and lock the window from user input.
- "
- self at: #PPRA_Window put: 16r80070001.
-
- " A pointer to a screen that can be used if no window is open: "
- self at: #PPRA_Screen put: 16r80070002.
-
- " A name of a public screen that will be used to open the window.
- * This can be NULL to use the default public screen.
- "
- self at: #PPRA_PubScreen put: 16r80070003
- |
- privateSetup
- (uniqueInstance isNil)
- ifTrue: [uniqueInstance <- self privateNew.
-
- self privateInitializeDictionary
- ].
-
- ^ self "or ^ uniqueInstance??"
- ]
-
- " ------------------------------------------------------------------- "
- " PrtCommands Class is a Singleton class that allows the user to "
- " reference special printer commands' decimal values symbolically. "
- ""
- " ALL singleton classes MUST contain the following: "
- ""
- " the methods: isSingleton AND privateSetup AND "
- " uniqueInstance Class instance variable. "
- " ------------------------------------------------------------------- "
-
- Class PrtCommands :Dictionary ! uniqueInstance !
- [
- isSingleton
- ^ true
- |
- privateNew ! newinstance !
- newinstance <- super new.
-
- ^ newinstance
- |
- new
- ^ self privateSetup
- |
- privateInitializeDictionary
- " printer command definitions: "
- " Cmd: Meaning: Defined by:"
-
- self at: #aRIS put: 0. " ESCc reset ISO "
- self at: #aRIN put: 1. " ESC#1 initialize AMI "
- self at: #aIND put: 2. " ESCD lf ISO "
- self at: #aNEL put: 3. " ESCE return,lf ISO "
- self at: #aRI put: 4. " ESCM reverse lf ISO "
-
- self at: #aSGR0 put: 5. " ESC[0m normal char set ISO "
- self at: #aSGR3 put: 6. " ESC[3m italics on ISO "
- self at: #aSGR23 put: 7. " ESC[23m italics off ISO "
- self at: #aSGR4 put: 8. " ESC[4m underline on ISO "
- self at: #aSGR24 put: 9. " ESC[24m underline off ISO "
- self at: #aSGR1 put: 10. " ESC[1m boldface on ISO "
- self at: #aSGR22 put: 11. " ESC[22m boldface off ISO "
- self at: #aSFC put: 12. " SGR30-39 set foreground color ISO "
- self at: #aSBC put: 13. " SGR40-49 set background color ISO "
-
- self at: #aSHORP0 put: 14. " ESC[0w normal pitch DEC "
- self at: #aSHORP2 put: 15. " ESC[2w elite on DEC "
- self at: #aSHORP1 put: 16. " ESC[1w elite off DEC "
- self at: #aSHORP4 put: 17. " ESC[4w condensed fine on DEC "
- self at: #aSHORP3 put: 18. " ESC[3w condensed off DEC "
- self at: #aSHORP6 put: 19. " ESC[6w enlarged on DEC "
- self at: #aSHORP5 put: 20. " ESC[5w enlarged off DEC "
-
- self at: #aDEN6 put: 21. " ESC[6''z shadow print on DEC "
- self at: #aDEN5 put: 22. " ESC[5''z shadow print off DEC "
- self at: #aDEN4 put: 23. " ESC[4''z doublestrike on DEC "
- self at: #aDEN3 put: 24. " ESC[3''z doublestrike off DEC "
- self at: #aDEN2 put: 25. " ESC[2''z NLQ on DEC "
- self at: #aDEN1 put: 26. " ESC[1''z NLQ off DEC "
-
- self at: #aSUS2 put: 27. " ESC[2v superscript on AMI "
- self at: #aSUS1 put: 28. " ESC[1v superscript off AMI "
- self at: #aSUS4 put: 29. " ESC[4v subscript on AMI "
- self at: #aSUS3 put: 30. " ESC[3v subscript off AMI "
- self at: #aSUS0 put: 31. " ESC[0v normalize the line AMI "
- self at: #aPLU put: 32. " ESCL partial line up ISO "
- self at: #aPLD put: 33. " ESCK partial line down ISO "
-
- self at: #aFNT0 put: 34. " ESC(B US char set or Typeface 0 (default) "
- self at: #aFNT1 put: 35. " ESC(R French char set or Typeface 1 "
- self at: #aFNT2 put: 36. " ESC(K German char set or Typeface 2 "
- self at: #aFNT3 put: 37. " ESC(A UK char set or Typeface 3 "
- self at: #aFNT4 put: 38. " ESC(E Danish I char set or Typeface 4 "
- self at: #aFNT5 put: 39. " ESC(H Sweden char set or Typeface 5 "
- self at: #aFNT6 put: 40. " ESC(Y Italian char set or Typeface 6 "
- self at: #aFNT7 put: 41. " ESC(Z Spanish char set or Typeface 7 "
- self at: #aFNT8 put: 42. " ESC(J Japanese char set or Typeface 8 "
- self at: #aFNT9 put: 43. " ESC(6 Norweign char set or Typeface 9 "
- self at: #aFNT10 put: 44. " ESC(C Danish II char set or Typeface 10 "
-
- " Suggested typefaces are:
- *
- * 0 - default typeface.
- * 1 - Line Printer or equiv.
- * 2 - Pica or equiv.
- * 3 - Elite or equiv.
- * 4 - Helvetica or equiv.
- * 5 - Times Roman or equiv.
- * 6 - Gothic or equiv.
- * 7 - Script or equiv.
- * 8 - Prestige or equiv.
- * 9 - Caslon or equiv.
- * 10 - Orator or equiv.
- "
-
- self at: #aPROP2 put: 45. " ESC[2p proportional on AMI "
- self at: #aPROP1 put: 46. " ESC[1p proportional off AMI "
- self at: #aPROP0 put: 47. " ESC[0p proportional clear AMI "
- self at: #aTSS put: 48. " ESC[n E set proportional offset ISO "
- self at: #aJFY5 put: 49. " ESC[5 F auto left justify ISO "
- self at: #aJFY7 put: 50. " ESC[7 F auto right justify ISO "
- self at: #aJFY6 put: 51. " ESC[6 F auto full justify ISO "
- self at: #aJFY0 put: 52. " ESC[0 F auto justify off ISO "
- self at: #aJFY3 put: 53. " ESC[3 F letter space (justify) ISO (special) "
- self at: #aJFY1 put: 54. " ESC[1 F word fill(auto center) ISO (special) "
-
- self at: #aVERP0 put: 55. " ESC[0z 1/8'' line spacing AMI "
- self at: #aVERP1 put: 56. " ESC[1z 1/6'' line spacing AMI "
- self at: #aSLPP put: 57. " ESC[nt set form length n DEC "
- self at: #aPERF put: 58. " ESC[nq perf skip n (n>0) AMI "
- self at: #aPERF0 put: 59. " ESC[0q perf skip off AMI "
-
- self at: #aLMS put: 60. " ESC#9 Left margin set AMI "
- self at: #aRMS put: 61. " ESC#0 Right margin set AMI "
- self at: #aTMS put: 62. " ESC#8 Top margin set AMI "
- self at: #aBMS put: 63. " ESC#2 Bottom marg set AMI "
- self at: #aSTBM put: 64. " ESC[Pn1;Pn2r T&B margins DEC "
- self at: #aSLRM put: 65. " ESC[Pn1;Pn2s L&R margin DEC "
- self at: #aCAM put: 66. " ESC#3 Clear margins AMI "
-
- self at: #aHTS put: 67. " ESCH Set horiz tab ISO "
- self at: #aVTS put: 68. " ESCJ Set vertical tabs ISO "
- self at: #aTBC0 put: 69. " ESC[0g Clr horiz tab ISO "
- self at: #aTBC3 put: 70. " ESC[3g Clear all h tab ISO "
- self at: #aTBC1 put: 71. " ESC[1g Clr vertical tabs ISO "
- self at: #aTBC4 put: 72. " ESC[4g Clr all v tabs ISO "
- self at: #aTBCALL put: 73. " ESC#4 Clr all h & v tabs AMI "
- self at: #aTBSALL put: 74. " ESC#5 Set default tabs AMI "
- self at: #aEXTEND put: 75. " ESC[Pn''x extended commands AMI "
-
- self at: #aRAW put: 76 " ESC[Pn''r Next 'Pn' chars are raw AMI "
- |
- privateSetup
- (uniqueInstance isNil)
- ifTrue: [uniqueInstance <- self privateNew.
-
- self privateInitializeDictionary
- ].
-
- ^ self "or ^ uniqueInstance??"
- ]
-